package com.ddz.library

import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context

object JKClipboardManager {
    fun clip(msg:String?){
        if(msg.isNullOrBlank())return
        val clipManager = JKLibrary.context!!.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
        val clipData = ClipData.newPlainText(JKLibrary.context!!.applicationInfo.loadLabel(JKLibrary.context!!.packageManager),msg)
        clipManager.setPrimaryClip(clipData)
    }
}